package Window;
import java.awt.Canvas;
import java.awt.Dimension;
import java.awt.Menu;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javax.swing.JFrame;

import Handle.KeyInput;
import Handle.MouseInput;
import Main.Game;


public class Window extends Canvas{

	private static final long serialVersionUID = -8755062190747637303L;
	
	private JFrame frame;
	
	public Window (int width, int height, String title, Menu menu, Game game)
	{
		//Khai bao 1 frame
		frame =new JFrame();
		frame.setUndecorated(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		frame.setPreferredSize(new Dimension(width, height));
		frame.setMaximumSize(new Dimension(width, height));
		frame.setMinimumSize(new Dimension(width, height));	
		
		frame.setLocationRelativeTo(null);
		frame.add(game);
		frame.setResizable(false);
		frame.setVisible(true);

		game.start();
	}


}
